<template>
    <div class="person">

    </div>
</template>

<script setup lang="ts" name="Person">
import { type PersonInter, type Persons2,type Persons3 } from '@/types';

    //data
    let person:PersonInter = {name:'zhang-san',age:18}
    //法1
    let personList:Array<PersonInter> = [
        {name:'张三',age:18},
        {name:'李四',age:60},
        {name:'王五',age:5}
    ]

    //法2
    let persons2:Persons2 = [
        {name:'张三',age:18},
        {name:'李四',age:60},
        {name:'王五',age:5}
    ]

    //法3
    let persons3:Persons3 = [
        {name:'张三',age:18},
        {name:'李四',age:60},
        {name:'王五',age:5}
    ]
</script>

    
<!-- //scoped：局部样式，确保.person只对对应文件生效 -->
<style scoped>
    .person {
        background-color: skyblue;
        box-shadow: 0 0 10px;
        border-radius: 10px;
        padding:20px;
    }
    button {
        margin: 0 5px;
    }
    ul li {
        font-size: 20px;
    }
</style>